<script type="text/javascript" src="{{"/js/modernizr.custom.js"|media }}"></script>
<script type="text/javascript">
    var askbot = {};
    askbot['data'] = {};
    askbot['data']['userIsAuthenticated'] = {{ request.user.is_authenticated()|as_js_bool }};
    askbot['data']['languageCode'] = '{{ current_language_code }}';
    {% if request.user.is_authenticated() %}
        askbot['data']['userId'] = {{ request.user.id }};
        askbot['data']['userName'] = '{{ request.user.username|escape }}';
        askbot['data']['userEmail'] = '{{ request.user.email|escape }}';
        askbot['data']['userIsAdminOrMod'] = {{ request.user.is_administrator_or_moderator()|as_js_bool }};
        askbot['data']['userIsAdmin'] = {{ request.user.is_administrator()|as_js_bool }};
        askbot['data']['userReputation'] = {{ request.user.reputation }};
        askbot['data']['userIsReadOnly'] = {{ request.user.is_read_only()|as_js_bool }};
    {% else %}
        askbot['data']['userReputation'] = 0;
        askbot['data']['userEmail'] = null;
        askbot['data']['userIsReadOnly'] = false;//in principle we allow anon users to start posting
    {% endif %}
    askbot['urls'] = {};
    askbot['settings'] = {};
    askbot['messages'] = {};
</script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
<script type="text/javascript" src="{{"/js/jquery-1.7.2.min.js"|media}}"></script>
{# avoid adding javascript here so that pages load faster #}
